package com.jcl.recruit.searchresume.logic;

import com.jcl.recruit.searchresume.mapper.SearchResumeRecordMapper;
import com.jcl.recruit.searchresume.model.SearchResumeRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

/**
 * @ClassName SearchResumeRecordLogic
 * @Description TODO
 * @Author yyliu
 * @Date 2018/10/31 11:35
 * @Version 1.0
 **/
@Component
public class SearchResumeRecordLogic implements SearchResumeRecordMapper {

    @Autowired
    private SearchResumeRecordMapper searchResumeRecordMapper;

    @Override
    public List<SearchResumeRecord> selectSearchResumeRecord(Integer userId,
                                                             String keyword,
                                                             String city,
                                                             String education,
                                                             Integer workYear,
                                                             Integer wechatPush,
                                                             Integer emailPush) {
        return searchResumeRecordMapper.selectSearchResumeRecord(userId, keyword, city, education,
                workYear, wechatPush, emailPush);
    }

    @Override
    public List<SearchResumeRecord> selectSearchResumeRecordByUserId(Integer userId) {
        return searchResumeRecordMapper.selectSearchResumeRecordByUserId(userId);
    }

    @Override
    public List<SearchResumeRecord> selectWechatPushRecordByUserId(Integer userId) {
        return searchResumeRecordMapper.selectWechatPushRecordByUserId(userId);
    }

    @Override
    public SearchResumeRecord selectSearchResumeRecordById(Integer id) {
        return searchResumeRecordMapper.selectSearchResumeRecordById(id);
    }

    @Override
    public int insertSelective(SearchResumeRecord record) {
        return searchResumeRecordMapper.insertSelective(record);
    }

    @Override
    public int updateByPrimaryKeySelective(SearchResumeRecord record) {
        return searchResumeRecordMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int deleteSearchResumeRecordById(Integer id) {
        return searchResumeRecordMapper.deleteSearchResumeRecordById(id);
    }

    @Override
    public String selectKeywordByCrawing(String from) {
        return searchResumeRecordMapper.selectKeywordByCrawing(from);
    }

    @Override
    public List<SearchResumeRecord> selectListsByKeyword(String keyword) {
        return searchResumeRecordMapper.selectListsByKeyword(keyword);
    }

    @Override
    public int batchUpdate(List<SearchResumeRecord> list) {
        return searchResumeRecordMapper.batchUpdate(list);
    }

    @Override
    public SearchResumeRecord selectPrimaryKeyByKeywordAndUpdatime(String date, String keyword) {
        return searchResumeRecordMapper.selectPrimaryKeyByKeywordAndUpdatime(date, keyword);
    }

    @Override
    public int batchUpdateCrawing(Date time) {
        return searchResumeRecordMapper.batchUpdateCrawing(time);
    }
}
